/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.employee.entity;

import com.thinkgem.jeesite.modules.sys.entity.Office;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 合同管理Entity
 * @author jyangye
 * @version 2018-01-10
 */
public class ViEmpContract extends DataEntity<ViEmpContract> {
	
	private static final long serialVersionUID = 1L;
	private String employeeId;		// 员工ID

	private String name;		// 姓名
	private String code;		// 身份证号
	private String phone;		// 联系电话
	private String contractNo;		// 合同编号
	private Date firstEndDate;		// 第一合同截止日期
	private Date secondEndDate;		// 第二合同截止日期
	private String notifyBefore;		// 待续签提醒月份
	private Date notifyDate;		// 待续签提醒日期
	private String reason;		// 放弃原因
	private String status;		// 合同状态

    private Office comp;
    private Office dept;
    private Office post;
	
	public ViEmpContract() {
		super();
	}

	public ViEmpContract(String id){
		super(id);
	}

	@Length(min=0, max=32, message="员工ID长度必须介于 0 和 32 之间")
	@ExcelField(title="员工ID", align=2, sort=20)
	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

    public Office getComp() {
        return comp;
    }

    public void setComp(Office comp) {
        this.comp = comp;
    }
    @ExcelField(title="部门", align=2, sort=40)
    public Office getDept() {
        return dept;
    }

    public void setDept(Office dept) {
        this.dept = dept;
    }
    @ExcelField(title="岗位", align=2, sort=50)
    public Office getPost() {
        return post;
    }

    public void setPost(Office post) {
        this.post = post;
    }

	@Length(min=1, max=32, message="姓名长度必须介于 1 和 32 之间")
	@ExcelField(title="姓名", align=2, sort=60)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=32, message="身份证号长度必须介于 1 和 32 之间")
	@ExcelField(title="*身份证号", align=2, sort=70, isText = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=32, message="联系电话长度必须介于 0 和 32 之间")
	@ExcelField(title="联系电话", align=2, sort=80)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=64, message="合同编号长度必须介于 0 和 64 之间")
	@ExcelField(title="*合同编号", align=2, sort=90)
	public String getContractNo() {
		return contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="第一合同截止日期不能为空")
	@ExcelField(title="*第一合同截止日期", align=2, sort=100)
	public Date getFirstEndDate() {
		return firstEndDate;
	}

	public void setFirstEndDate(Date firstEndDate) {
		this.firstEndDate = firstEndDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@ExcelField(title="*第二合同截止日期", align=2, sort=110)
	public Date getSecondEndDate() {
		return secondEndDate;
	}

	public void setSecondEndDate(Date secondEndDate) {
		this.secondEndDate = secondEndDate;
	}
	
	@Length(min=0, max=32, message="待续签提醒月份长度必须介于 0 和 32 之间")
	@ExcelField(title="*待续签提醒月份", align=2, sort=120)
	public String getNotifyBefore() {
		return notifyBefore;
	}

	public void setNotifyBefore(String notifyBefore) {
		this.notifyBefore = notifyBefore;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@ExcelField(title="*待续签提醒日期", align=2, sort=130)
	public Date getNotifyDate() {
		return notifyDate;
	}

	public void setNotifyDate(Date notifyDate) {
		this.notifyDate = notifyDate;
	}

    @Length(min=0, max=32, message="放弃签订原因长度必须介于 0 和 32 之间")
    @ExcelField(title="放弃签订原因", align=2, sort=120)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
}